package cn.edu.zafu.bigdata.YinMingyan.chapter06;

public class GetElement {
    public static int getElement(int[] arr, int index) {
        try {
            return arr[index];
        } catch (ArrayIndexOutOfBoundsException e) {
            throw new ArrayIndexOutOfBoundsException("索引超出数组范围: " + index);
        }
    }
}